package com.reactim.message.config;

import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 性能监控配置
 */
@Configuration
@EnableScheduling
public class PerformanceMonitoringConfig {
    
    /**
     * 提供一个简单的MeterRegistry实现
     */
    @Bean
    public MeterRegistry meterRegistry() {
        SimpleMeterRegistry registry = new SimpleMeterRegistry();
        // 添加通用标签
        registry.config().commonTags(
            "application", "reactim-message-service",
            "version", "1.0.0"
        );
        return registry;
    }
}